package com.project.controller;

import com.project.bean.GradeBean;
import com.project.service.IGradeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("grade")
@Api(tags = "权限")
public class GradeController {
    @Autowired
    private IGradeService gradeService;
    @RequestMapping("findByRoleId")
    @ApiOperation(value = "根据角色id数组查询权限")
    public List<GradeBean> findByRoleId(Integer[] roleIdArray){
        return gradeService.findByRoleId(roleIdArray);
    }
    @RequestMapping("findAllGrade")
    @ApiOperation(value = "查询所有的权限")
    public List<GradeBean> findAllGrade(){
        return gradeService.findAllGrade();
    }
}
